package cn.supermarket.ex;


import cn.supermarket.web.State;

public class ServiceException extends RuntimeException {
    private State state;

    public ServiceException ServiceException(State state) {
        return new ServiceException(state, null);
    }

    public ServiceException(State state, String message) {
        super(message);
        if (state == null) {
            throw new IllegalArgumentException();
        }
        this.state = state;
    }

    public State getState() {
        return state;
    }
}
